import { stringify } from 'qs';
import request from '@/utils/request';
import {formDataCode} from '@/utils/utils';


// 获取店铺短信信息
export async function GetStoreSmsConfig(params) {
    return request(`/${window.storeId}/AppConfig/GetStoreSmsConfig?${stringify(params)}`);
}

// 获取店铺短信发送记录(分页)
export async function GetSmsSendRecordListWithPage(params) {
    return request(`/${window.storeId}/AppConfig/GetSmsSendRecordListWithPage?${stringify(params)}`);
}

// 获取店铺短信充值记录(分页)
export async function GetSmsRechargeRecordListWithPage(params) {
  return request(`/${window.storeId}/AppConfig/GetSmsRechargeRecordListWithPage?${stringify(params)}`);
}

// 获取店铺短信签名
export async function GetSmsSignName(params) {
    return request(`/${window.storeId}/AppConfig/GetSmsSignName?${stringify(params)}`);
}

// 修改签名发送测试短信
export async function SendTestMsg(params) {
    return request(`/${window.storeId}/AppConfig/SendTestMsg`, {
      method: 'POST',
      headers:{
        'Content-Type':"application/x-www-form-urlencoded",        
     },
     body: formDataCode(params)
    });
}

// 修改短信签名
export async function ChangeSignName(params) {
    return request(`/${window.storeId}/AppConfig/ChangeSignName`, {
      method: 'POST',
      headers:{
        'Content-Type':"application/x-www-form-urlencoded",        
     },
     body: formDataCode(params)
    });
}

//概况
export async function GetOrderProfileData(params) {
    return request(`/${window.storeId}/AppConfig/GetOrderProfileData?${stringify(params)}`);
}